var should = require('should');
var luckyHandler = require('../../../app/servers/user/handler/luckyHandler');
var config = require('../../config');
var configUtil = require('../../../app/util/configUtil');
var analyze = require('kc-analyze');

suite('测试luckyHandler', function () {
    setup(function (done) {
        var analyze_config = configUtil.load('analyze');
        var game_config = configUtil.load('game');
        analyze.initialize({
            host: analyze_config.host,
            server_id: game_config.server_id
        });
        done();
    });

    // suite('guideReceive', function () {
    //     test('新手引导转盘', function (done) {
    //         var msg = {
    //             position_id: 1
    //         };
    //         var session = {};
    //         session.uid = config.role_id;

    //         var lucky_handler = new luckyHandler();
    //         lucky_handler.guideReceive(msg, session, function (err, res) {
    //             // console.log('res:', res);
    //             done();
    //         });
    //     });
    // });

    // suite('turntaList', function () {
    //     test('转盘', function (done) {
    //         var msg = {
    //             position_id: 9
    //         };
    //         var session = {};
    //         session.uid = config.role_id;

    //         var lucky_handler = new luckyHandler();
    //         lucky_handler.turntaList(msg, session, function (err, res) {
    //             // console.log('res:', res);
    //             done();
    //         });
    //     });
    // });

    suite('receive', function () {
        test('转盘', function (done) {
            var msg = {};
            var session = {};
            session.uid = config.role_id;

            var lucky_handler = new luckyHandler();
            lucky_handler.receive(msg, session, function (err, res) {
                console.log('res:', res);
                done();
            });
        });
    });

    // suite('turntableReset', function () {
    //     test('重置转盘', function (done) {
    //         var msg = {};
    //         var session = {};
    //         session.uid = config.role_id;

    //         var lucky_handler = new luckyHandler();
    //         lucky_handler.turntableReset(msg, session, function (err, res) {
    //             console.log('res:', res);
    //             done();
    //         });
    //     });
    // });
});
